<template>
  <div class="error-page">
    <h1>404</h1>
    <p>页面不存在</p>
    <button @click="goHome">返回首页</button>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'

const router = useRouter()

const goHome = () => {
  router.push('/')
}
</script>

<style scoped>
.error-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  text-align: center;
}

.error-page h1 {
  font-size: 120px;
  font-weight: bold;
  color: #333;
  margin: 0;
}

.error-page p {
  font-size: 24px;
  color: #666;
  margin: 20px 0 40px;
}

.error-page button {
  padding: 12px 32px;
  font-size: 16px;
  color: white;
  background-color: #1890ff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.error-page button:hover {
  background-color: #40a9ff;
}
</style>